import request from '@/utils/request'

export default {

    //企业用户判定这个用户是否和职位相符合
    fit(deliveryId,positionId,feedback){
        return request({
            url:'/workjobs/workjob/fit/' + deliveryId + '/' + positionId + '/' + feedback,
            method:'post'
        })
    },

    notFit(deliveryId,positionId,feedback){
        return request({
            url: '/workjobs/workjob/notFit/' + deliveryId + '/' + positionId + '/' + feedback,
            method:'post'
        })
    },






    /*这个是求职投递的数量接口（提供给求职者查询）*/
    showDeliveryOtherInfoJobHunter(userId){
        return request({
            url:'/workjobs/userpositiondeliverpersonal/deilver-other-info/' + userId,
            method:'get'
        })
    },

    /*这个是查询企业Hr收到的投递数量，等信息*/
    receiveDeliveryOtherInfo(userId){
        return request({
            url:'/workjobs/deliverycreateuserposition/receive-delivery-other-info/' + userId,
            method:'get'
        })
    },




    /*暂停招聘*/
    pauseRecruit(workId){
        return request({
            url:'/workjobs/workjob/pauseRecruit/' + workId,
            method:'post'
        })
    },
    /*停止招聘*/
    stopRecruit(workId){
      return request({
          url:'/workjobs/workjob/stopRecruit/' + workId,
          method:'post'
      })
    },
    /*继续招聘*/
    continueRecruit(workId){
        return request({
            url:'/workjobs/workjob/continueRecruit/' + workId,
            method:'post'
        })
    },


    /*职位撤销发布*/
    cancelPublish(id){
        return request({
            url:'/workjobs/workjob/cancel-publish/' + id,
            method:'post'
        })
    },

    /*根据企业找账号的Id查询出来有那些求职者投递了我发布的职位*/
    companyCountDeliver(userId,current,limit){
        return request({
            url:'/workjobs/workjob/userDeliverSomePosition/' + userId + '/' + current + '/' + limit,
            method:'get'
        })
    },


    /*查询用户投递的职位信息*/
    deliverFindUserPosition(userId,current,limit){
        return request({
            url:'/workjobs/workjob/workPosition/' + userId + '/' + current + '/' + limit,
            method:'get'
        })
    },

    /*职位的投递*/
    deliver(workJobId,userId){
        return request({
            url:'/workjobs/workjob/deliver/' + workJobId + '/' + userId,
            method:'post'
        })
    },



    /*----------------------------------------------*/

    /*更新职位的信息*/
    updataWorkInfo(data){
        return request({
            url:'/workjobs/workjob/update',
            method:'post',
            data:data
        })
    },

    /*根据不同的用户展示不同的职位信息*/
    showPostion(current,size,queryCondition) {

        console.log("queryCondition ===>",queryCondition)
        return request({
            url:'workjobs/workjob/showListWorkInfo/' + current + '/' + size,
            method:'post',
            data:queryCondition == undefined?{}:queryCondition
        })
    },
    /*修改职位发布的状态*/
    publish(id){
        return request({
            url:'/workjobs/workjob/publish/' + id,
            method:'post',
        })
    },
    /*根据用户的Id加载相对应的职位信息 发布信息*/
    iPageListPositionPublish(currentPage,pageSize,userId,publishStatus) {
        return request({
            url:'/workjobs/userposition/list-publish-s',
            method:'get',
            params:{
                "currentPage":currentPage,
                "size":pageSize,
                "userId":userId,
                "publishStatus":publishStatus
            }
        })
    },
    /*根据用户的Id加载相对应的职位信息  审核信息*/
    loadinit(currentPage,pageSize,userId,approveStatus,ispass){
        return request({
            url:'/workjobs/userposition/list-publish',
            method:'get',
            params:{
                "currentPage":currentPage,
                "size":pageSize,
                "userId":userId,
                "approve":approveStatus,
                "ispass":ispass
            }
        })
    },


    createWorkJob(data){
        return request({
            url:`/workjobs/workjob/save`,
            method:'post',
            data:data
        })
    }

}
